<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

use App\Amqp\Log;

/**
 * 处理客户端传输的日志
 */
class LogQueue extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'log'; //执行脚本的命令别名

    /**
     * The console command description.
     *
     * @var string
     */
    //protected $description = 'test schedule';

    function __construct()
    {
        parent::__construct();
    }

    public function handle()
    {
        // 脚本的业务逻辑在这里写即可
        echo "log";
        //消费者开启
        $amqp=config('amqp.log');

        $con= new Log($amqp,'loglist');
        $con->receive();
    }

}